#include "MefoolCriticalSectionEnterer.h"

#include <assert.h>
#include <windows.h>

namespace Mefool
{

CriticalSectionEnterer::CriticalSectionEnterer( CRITICAL_SECTION& criticalSection )
	: mCriticalSection( criticalSection )
{
	EnterCriticalSection( &mCriticalSection );
}	

CriticalSectionEnterer::~CriticalSectionEnterer()
{
	LeaveCriticalSection( &mCriticalSection );
}

}
